import http from './index'

export const create = (data) => http({
  url: '/visitor/device/addVisitor',
  method: 'POST',
  data,
})

export const update = (data) => http({
  url: '/visitor/device/updateVisitor',
  method: 'POST',
  data,
})

export const getListArea = (params) => http({
  url: '/device-os/area/list',
  method: 'GET',
  params,
})

export const getList = (params) => http({
  url: '/visitor/device/visitorList',
  method: 'GET',
  params,
})

export const del = (data) => http({
  url: '/visitor/device/deleteVisitor',
  method: 'POST',
  data,
})

export const bindArea = (data) => http({
  url: '/device-os/device/bindarea',
  method: 'POST',
  data,
})

export const upgrade = (data) => http({
  url: '/device-os/device/checkUpgrade',
  method: 'POST',
  data,
})
export const lineAccess = (data) => http({
  url: '/device-os/device/upOfflineAccess ',
  method: 'POST',
  data,
})

export const restart = (data) => http({
  url: '/device-os/device/restart',
  method: 'POST',
  data,
})

export const open = (data) => http({
  url: '/device-os/device/open',
  method: 'POST',
  data,
})
export const openTime = (data) => http({
  url: '/device-os//device/sendServerTime',
  method: 'POST',
  data,
})


export const IDCard = (params) => http({
  url: 'http://127.0.0.1:24010/ZKIDROnline/IDFP',
  method: 'GET',
  params,
})
